// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.inventory.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.inventory.entity.InventoryPlacement;
import com.fowo.api.inventory.model.*;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface InventoryPlacementMapper
  extends BaseMapper<InventoryPlacement> {
  Page<InventoryPlacementItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") InventoryPlacementSearchParamPo search
  );
  List<InventoryPlacementItemVo> search(
    @Param("search") InventoryPlacementSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") InventoryPlacementSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") InventoryPlacementSearchParamPo search);
  Long getIdByStockId(@Param("stockId") Long stockId);

  List<Long> getIdsByStockId(@Param("list") List<Long> list);

  Integer getStockIdById(@Param("id") Long id);

  List<Integer> getStockIdByIds(@Param("ids") List<Long> ids);
  InventoryPlacementVo selectVoById(@Param("id") Long id);

  List<InventoryPlacement> selectStorageByWhereOne(@Param("search") InventoryStorageVo inventoryStorageVo,@Param("binId") Long binId);

  InventoryPlacement selectOutboundByWhereOne(@Param("search") InventoryOutboundVo model, @Param("binId")Long binId);

  List<InventoryPlacement> queryWrapperInventoryPlacementexchangeFromShiftSql(@Param("search") InventoryExchangeVo model, @Param("binId")Long binId,@Param("descOrAsc")String descOrAsc);

  List<InventoryPlacement> queryWrapperInventoryPlacementexchangeFromShiftSqlList(@Param("search") InventoryExchangeVo model, @Param("binId")Long binId,@Param("descOrAsc")String descOrAsc);

  List<InventoryPlacement> selectOutboundByWhereList(@Param("search") InventoryOutboundVo model, @Param("binId")Long binId);

    List<InventoryPlacement> selectByStorageList(@Param("items")List<Long> items);

    int updateBatch(@Param("list")List<InventoryPlacement> updateInventoryPlacementList);
}
